package cn.edu.nuc.fourth.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.edu.nuc.fourth.model.Teacher;

public interface TeacherMapper {
	int deleteByPrimaryKey(Integer teacherid);

	int insert(Teacher record);

	int insertSelective(Teacher record);

	Teacher selectByPrimaryKey(Integer teacherid);

	int updateByPrimaryKeySelective(Teacher record);

	int updateByPrimaryKey(Teacher record);

	/**
	 * 记录数
	 * 
	 * @param userid
	 * @return
	 */
	public Integer count(@Param("userid") Integer userid);

	/**
	 * 分页
	 * 
	 * @param userid
	 * @param start
	 * @param offset
	 * @return
	 */
	public List<Teacher> page(@Param("userid") Integer userid, @Param("start") Integer start,
			@Param("offset") Integer offset);

	/**
	 * 根据时间和id查
	 * 
	 * @param userid
	 * @param date
	 * @return
	 */
	public Teacher findByDate(@Param("userid") Integer userid, @Param("tdate") String date);
}